package com.dl698.axdr;

/**
 * ProxySetThenGetResultChoice枚举
 * 定义代理设置后读取结果选择的枚举值
 */
public enum ProxySetThenGetResultChoice {
    _ERR_NONE_SELECTED(-1),
    DAR(0),
    DATA(1);

    private final int value;

    ProxySetThenGetResultChoice(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static ProxySetThenGetResultChoice fromValue(int value) {
        for (ProxySetThenGetResultChoice choice : ProxySetThenGetResultChoice.values()) {
            if (choice.value == value) {
                return choice;
            }
        }
        return _ERR_NONE_SELECTED;
    }
}